package com.ddc.study.feature.collect.article;

import com.ddc.study.base.BasePresenter;
import com.ddc.study.base.BaseView;
import com.ddc.study.entity.Collection;
import com.ddc.study.entity.MainData;

import androidx.annotation.IntRange;

/**
 * Created on 2018/5/14.
 *
 * @author lshun
 * @version 1.0
 */
interface CollectArticleContract {
    interface IModel {
    }

    interface IView extends BaseView {
        void loadDataSuccess(MainData<Collection> data);

        void loadDataFailed(String msg);

        void showUnCollectResult(boolean result, int id, int originId);

        void showAddCollectResult(boolean result);
    }

    abstract class IPresenter extends BasePresenter<IView> {
        abstract void loadData(@IntRange(from = 1) int page);

        abstract void unCollectArticle(int id, int originId);

        abstract void addCollect(String title, String author, String link);
    }
}
